import axios from 'axios'

export function getData(pieContry) {
  return new Promise((resolve, reject) => {
    axios({
      url: 'https://api.inews.qq.com/newsqa/v1/query/pubished/daily/list?province=' + pieContry,
      method: 'get',
      headers: {
        'Content-Type': 'application/json'
      },
    })
      .then(res => {
        resolve(res.data)
      })
      .catch(res => {
        reject(res)
      })
  })
}
